package com.basics.service.impl;

import com.basics.mapper.StudentInfomationMapper;
import com.basics.model.StudentInfomation;
import com.basics.service.StudentInfomationService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


@Service
@Transactional(rollbackFor = Exception.class)
public class StudentInfomationServiceImpl implements StudentInfomationService {

    @Resource
    private StudentInfomationMapper studentInfomationMapper;


    @Override
    public List<StudentInfomation> getAllStudentInfo(Integer pageIndex,Integer pageSize) {
        return studentInfomationMapper.selectAllStudentInfo(pageIndex,pageSize);
    }

    @Override
    public Integer getStudetCountNumber() {
        return studentInfomationMapper.countByExample();
    }
}
